WOLF core
WOLF: A Modular Estimation Framework for Robotics
XXXXXXXXXXXXXXXXXXXXXXXXvoid(0)" frameborder="0" name="MSearchResults" id="MSearchResults">
landmark.h
Go to the documentation of this file.
1// WOLF - Copyright (C) 2020-2026
2// Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
3// Authors: Joan Solà Ortega (jsola@iri.upc.edu) and
4// Joan Vallvé Navarro (jvallve@iri.upc.edu)
5// All rights reserved.
6//
7// This file is part of WOLF: http://www.iri.upc.edu/wolf
8// WOLF is free software: you can redistribute it and/or modify
9// it under the terms of the GNU General Public License version 3
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19#pragma once
20
21// Wolf includes
23
24namespace wolf
25{
26template <unsigned int DIM>
27class Landmark : public LandmarkBase
28{
29 public:
38 Landmark(const VectorComposite& _state_vectors,
39 const PriorComposite& _state_priors = {},
40 const int _external_id = -1,
41 const int _external_type = -1);
42
48 Landmark(const YAML::Node& _n);
49
51
52 ~Landmark() override = default;
53};
54
57
60
62// IMPLEMENTATION //
64
65template <unsigned int DIM>
66inline Landmark<DIM>::Landmark(const VectorComposite& _state_vectors,
67 const PriorComposite& _state_priors,
68 const int _external_id,
69 const int _external_type)
71 "Landmark" + std::to_string(DIM) + "d",
72 {{'P', DIM == 2 ? "StatePoint2d" : "StatePoint3d"}, {'O', DIM == 2 ? "StateAngle" : "StateQuaternion"}},
73 _state_vectors,
74 _state_priors,
75 _external_id,
76 _external_type)
77{
78 static_assert(DIM == 2 or DIM == 3);
79}
80
81template <unsigned int DIM>
82inline Landmark<DIM>::Landmark(const YAML::Node& _n)
84 "Landmark" + std::to_string(DIM) + "d",
85 {{'P', DIM == 2 ? "StatePoint2d" : "StatePoint3d"}, {'O', DIM == 2 ? "StateAngle" : "StateQuaternion"}},
86 _n)
87{
88 static_assert(DIM == 2 or DIM == 3);
89}
90
91} // namespace wolf
Definition: landmark_base.h:92
Definition: landmark.h:28
Landmark(const VectorComposite &_state_vectors, const PriorComposite &_state_priors={}, const int _external_id=-1, const int _external_type=-1)
Constructor specs composite.
Definition: landmark.h:66
WOLF_LANDMARK_TEMPLATE_DIM_CREATE(Landmark, DIM)
~Landmark() override=default
Definition: vector_composite.h:27
Definition: jet.h:1355
std::string to_string(const Eigen::DenseBase< Derived > &mat)
Definition: string_utils.h:48
Definition: capture_base.h:23
WOLF_DECLARED_PTR_TYPEDEFS(Landmark2d)
Landmark< 3 > Landmark3d
Definition: landmark.h:56
Landmark< 2 > Landmark2d
Definition: landmark.h:55